<?php
/* $Id: sets.php,v 1.1 JOP $ */
/**
 * @package Issue-Tracker
 * @subpackage Isets
 */
if (strpos($_SERVER['PHP_SELF'],basename(__FILE__)) !== false) {
  print "Direct module access forbidden.".basename(__FILE__);exit;}
  
// Make sure user is employee
if (!is_employee()) {
  access_denied();
}

$setid =  $_GET['setid'];
$issueid =  $_GET['issueid'];

if ($_GET['subaction'] == "unassign"
   and !empty($issueid)
   and !empty($setid)) {
   unassign_issue($issueid,$setid);
   redirect("?module=isets&action=view&setid=".$setid);
   }

//$update['comment']      = $_POST['comment'];
$update['closed']       = $_POST['closed'] == "on" ? "t" : "f";
$update['private']      = $_POST['private'] == "on" ? "t" : "f";

$dbi->update("z_issues_set",$update,"WHERE setid='".$setid."'");
unset($update);

redirect("?module=isets&action=view&setid=".$setid);

?>